Skip to content

Conversation

@sadanand48
Copy link
Contributor

What changes were proposed in this pull request?

In the current streaming code we maintain only one bufferList for retry. Buffers in the list are removed only during watchForCommit. So there might occur a case if putBlock is followed by another putBlock the commitInfoMap has the same list for both indexes which will cause incorrect computation of totalAckDatalength which is used during retry

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-6139

How was this patch tested?

unit test

@sadanand48 sadanand48 requested a review from szetszwo January 11, 2022 12:07
Copy link
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sadanand48 , the change looks good. Just two minor comments inlined.

checksum = new Checksum(config.getChecksumType(),
config.getBytesPerChecksum());
metrics = XceiverClientManager.getXceiverClientMetrics();
buffersForPutBlock = new ArrayList<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line. The list will be created in writeChunk(..).

keyDataStreamOutput.getStreamEntries().get(0);
key.write(ByteBuffer.wrap(data));
key.close();
Assert.assertTrue(stream.getTotalAckDataLength()==dataLength);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use assertEquals, i.e.

    Assert.assertEquals(dataLength, stream.getTotalAckDataLength());

Copy link
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 the change looks good.

@bshashikant
Copy link
Contributor

Thanks @sadanand48 for the contribution.

@bshashikant bshashikant merged commit 1fad300 into apache:HDDS-4454 Jan 13, 2022
szetszwo pushed a commit to szetszwo/ozone that referenced this pull request May 6, 2022
captainzmc pushed a commit to captainzmc/hadoop-ozone that referenced this pull request Jul 4, 2022
szetszwo pushed a commit that referenced this pull request Oct 25, 2022
…aLength. (#2978)

(cherry picked from commit 0db32a0)
(cherry picked from commit 6bd6cc7f2d605168432930f55138cba5b582f984)
szetszwo pushed a commit that referenced this pull request Nov 7, 2022
…aLength. (#2978)

(cherry picked from commit 0db32a0)
(cherry picked from commit 6bd6cc7f2d605168432930f55138cba5b582f984)
(cherry picked from commit 25c3495)
szetszwo pushed a commit that referenced this pull request Dec 1, 2022
szetszwo pushed a commit that referenced this pull request Dec 16, 2022
nishitpatira pushed a commit to nishitpatira/ozone that referenced this pull request Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants